﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ControlKhaiBaoChiSoTinhLuongThuong.ascx.cs" Inherits="WebUserControl_ControlKhaiBaoChiSoTinhLuongThuong" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<%@ Register src="uscTitleForm.ascx" tagname="uscTitleForm" tagprefix="uc1" %>
<%@ Register src="uscMsgBox.ascx" tagname="uscMsgBox" tagprefix="uc1" %>

<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<uc1:uscTitleForm ID="uscTitleForm1" runat="server" Messeage="Khai báo chỉ số tính lương thưởng" />
<uc1:uscMsgBox ID="uscMsgBox1"  runat="server" />
<fieldset>
<div>Chọn chính sách áp dụng : <span><asp:DropDownList width="150px" 
        ID="DropChinhSach" runat="server"  AutoPostBack="true"
        onselectedindexchanged="DropChinhSach_SelectedIndexChanged"></asp:DropDownList></span></div>
<br />
        <table>
                <tr align="center">
                    <td>Danh hiệu</td>
                    <td>BA toàn nhóm</td>
                    <td>DSCN/Tháng</td>
                    <td>DSNCN/Tháng</td>
                    <td>DS cả nhóm/Tháng</td>
                    <td>Nhánh chuẩn</td>
                    <td></td>
                </tr>
                <tr align="center">
                    <td><asp:DropDownList width="150px" ID="DropDT" runat="server"></asp:DropDownList></td>
                    <td>
                    <asp:TextBox  width="100px" ID="txtBAToanNhom" runat="server"></asp:TextBox>
                        <cc1:FilteredTextBoxExtender TargetControlID="txtBAToanNhom" FilterType="Numbers" 
                            ID="FilteredTextBoxExtender1" runat="server" Enabled="True">
                        </cc1:FilteredTextBoxExtender>
                         <asp:RequiredFieldValidator ControlToValidate="txtBAToanNhom" Display="None" ID="R2" runat="server" ErrorMessage="Phải nhập số BA toàn nhóm"></asp:RequiredFieldValidator>
                <cc1:ValidatorCalloutExtender TargetControlID="R2" 
                    ID="ValidatorCalloutExtender2" runat="server" Enabled="True">
                </cc1:ValidatorCalloutExtender>
                
                    </td>
                    <td>
                    
                    <asp:TextBox  width="100px" ID="txtDSCN" runat="server"></asp:TextBox>
                        <cc1:FilteredTextBoxExtender TargetControlID="txtDSCN" FilterType="Numbers" 
                            ID="FilteredTextBoxExtender2" runat="server" Enabled="True">
                        </cc1:FilteredTextBoxExtender>
                         <asp:RequiredFieldValidator ControlToValidate="txtDSCN" Display="None" ID="RequiredFieldValidator1" runat="server" ErrorMessage="Phải nhập doanh số cá nhân">
                         </asp:RequiredFieldValidator>
                <cc1:ValidatorCalloutExtender TargetControlID="RequiredFieldValidator1" 
                    ID="ValidatorCalloutExtender1" runat="server" Enabled="True">
                </cc1:ValidatorCalloutExtender>
                
                    </td>
                    <td>
                    <asp:TextBox  width="100px" ID="txtDSNCN" runat="server"></asp:TextBox>
                         <cc1:FilteredTextBoxExtender TargetControlID="txtDSNCN" FilterType="Numbers" 
                            ID="FilteredTextBoxExtender3" runat="server" Enabled="True">
                        </cc1:FilteredTextBoxExtender>
                        <asp:RequiredFieldValidator ControlToValidate="txtDSNCN" Display="None" ID="RequiredFieldValidator2" runat="server" ErrorMessage="Phải nhập doanh số nhóm cá nhân">
                         </asp:RequiredFieldValidator>
                <cc1:ValidatorCalloutExtender TargetControlID="RequiredFieldValidator2" 
                    ID="ValidatorCalloutExtender3" runat="server" Enabled="True">
                </cc1:ValidatorCalloutExtender>
                
                    </td>
                    <td>
                    <asp:TextBox  width="100px" ID="txtDSCaNHom" runat="server"></asp:TextBox>
                         <cc1:FilteredTextBoxExtender TargetControlID="txtDSCaNHom" FilterType="Numbers" 
                            ID="FilteredTextBoxExtender4" runat="server" Enabled="True">
                        </cc1:FilteredTextBoxExtender>
                        <asp:RequiredFieldValidator ControlToValidate="txtDSCaNHom" Display="None" ID="RequiredFieldValidator3" runat="server" ErrorMessage="Phải nhập doanh số cả nhóm">
                         </asp:RequiredFieldValidator>
                <cc1:ValidatorCalloutExtender TargetControlID="RequiredFieldValidator3" 
                    ID="ValidatorCalloutExtender4" runat="server" Enabled="True">
                </cc1:ValidatorCalloutExtender>
                
                    </td>
                    <td>
                    <asp:TextBox  width="100px" ID="txtNhanhChuan" runat="server"></asp:TextBox>
                         <cc1:FilteredTextBoxExtender TargetControlID="txtNhanhChuan" FilterType="Numbers" 
                            ID="FilteredTextBoxExtender5" runat="server" Enabled="True">
                        </cc1:FilteredTextBoxExtender>
                        <asp:RequiredFieldValidator ControlToValidate="txtNhanhChuan" Display="None" ID="RequiredFieldValidator4" runat="server" ErrorMessage="Phải nhập số nhánh chuẩn">
                         </asp:RequiredFieldValidator>
                <cc1:ValidatorCalloutExtender TargetControlID="RequiredFieldValidator4" 
                    ID="ValidatorCalloutExtender5" runat="server" Enabled="True">
                </cc1:ValidatorCalloutExtender>
                    </td>
                    <td><asp:Button ID="btAdd" runat="server" Text="Thêm" onclick="btAdd_Click"/></td>
                </tr>
        </table>
</fieldset>
<br />
<fieldset>
 <asp:GridView ID="GridView1"  AutoGenerateColumns="False" runat="server" 
          CellPadding="4" ForeColor="#333333"  DataKeyNames="Rate"
          GridLines="None"  onrowdeleting="GridView1_RowDeleting" 
        onrowcancelingedit="GridView1_RowCancelingEdit" 
        onrowediting="GridView1_RowEditing" onrowupdating="GridView1_RowUpdating">
          <RowStyle BackColor="#FFFBD6" ForeColor="#333333" />
          <FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
          <PagerStyle BackColor="#FFCC66" ForeColor="#333333" HorizontalAlign="Center" />
          <SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="Navy" />
          <HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
          <AlternatingRowStyle BackColor="White" />
          <Columns>
            <asp:BoundField DataField="Rate" Visible="false" ReadOnly="True" />
            <asp:BoundField DataField="DanhHieu" HeaderText="Cấp bậc" ReadOnly="True" />
            
             <asp:TemplateField HeaderText="BA toàn nhóm">
                    <EditItemTemplate>
                        <asp:TextBox width="100px" ID="txtGridBAToanNhom" runat="server" Text='<%# Bind("BAToanNhom") %>'></asp:TextBox>
                        <cc1:FilteredTextBoxExtender TargetControlID="txtGridBAToanNhom" FilterType="Numbers" 
                            ID="FilteredTextBoxExtender6" runat="server" Enabled="True">
                        </cc1:FilteredTextBoxExtender>
                        <asp:RequiredFieldValidator ControlToValidate="txtGridBAToanNhom" Display="None" ID="RequiredFieldValidator10" runat="server" ErrorMessage="Phải nhập số lượng BA">
                         </asp:RequiredFieldValidator>
                <cc1:ValidatorCalloutExtender TargetControlID="RequiredFieldValidator10" 
                    ID="ValidatorCalloutExtender10" runat="server" Enabled="True">
                </cc1:ValidatorCalloutExtender>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:Label ID="lblGridBAToanNhom" runat="server" Text='<%# Bind("BAToanNhom") %>'></asp:Label>
                    </ItemTemplate>
                    <ItemStyle HorizontalAlign="Center" />
                    <HeaderStyle HorizontalAlign="Center" />
                </asp:TemplateField>
                
          
            
             <asp:TemplateField HeaderText="DSCN/Tháng">
                    <EditItemTemplate>
                        <asp:TextBox width="100px" ID="txtGridDSCN" runat="server" Text='<%# Bind("DSCN") %>'></asp:TextBox>
                        <cc1:FilteredTextBoxExtender TargetControlID="txtGridDSCN" FilterType="Numbers" 
                            ID="FilteredTextBoxExtender7" runat="server" Enabled="True">
                        </cc1:FilteredTextBoxExtender>
                        <asp:RequiredFieldValidator ControlToValidate="txtGridDSCN" Display="None" ID="RequiredFieldValidator11" runat="server" ErrorMessage="Phải nhập doanh số cá nhân">
                         </asp:RequiredFieldValidator>
                <cc1:ValidatorCalloutExtender TargetControlID="RequiredFieldValidator11" 
                    ID="ValidatorCalloutExtender11" runat="server" Enabled="True">
                </cc1:ValidatorCalloutExtender>
                
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:Label ID="lblGridDSCN" runat="server" Text='<%# Bind("DSCN") %>'></asp:Label>
                    </ItemTemplate>
                    <ItemStyle HorizontalAlign="Center" />
                    <HeaderStyle HorizontalAlign="Center" />
                </asp:TemplateField>
            
            
            <asp:TemplateField HeaderText="DSNCN/Tháng">
                    <EditItemTemplate>
                        <asp:TextBox width="100px" ID="txtGridDSNCN" runat="server" Text='<%# Bind("DSNCN") %>'></asp:TextBox>
                         <cc1:FilteredTextBoxExtender TargetControlID="txtGridDSNCN" FilterType="Numbers" 
                            ID="FilteredTextBoxExtender8" runat="server" Enabled="True">
                        </cc1:FilteredTextBoxExtender>
                         <asp:RequiredFieldValidator ControlToValidate="txtGridDSNCN" Display="None" ID="RequiredFieldValidator12" runat="server" ErrorMessage="Phải nhập doanh số nhóm cá nhân">
                         </asp:RequiredFieldValidator>
                <cc1:ValidatorCalloutExtender TargetControlID="RequiredFieldValidator12" 
                    ID="ValidatorCalloutExtender12" runat="server" Enabled="True">
                </cc1:ValidatorCalloutExtender>
                
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:Label ID="lblGridDSNCN" runat="server" Text='<%# Bind("DSNCN") %>'></asp:Label>
                    </ItemTemplate>
                    <ItemStyle HorizontalAlign="Center" />
                    <HeaderStyle HorizontalAlign="Center" />
                </asp:TemplateField>
                
            
            
             <asp:TemplateField HeaderText="DS cả nhóm/Tháng">
                    <EditItemTemplate>
                        <asp:TextBox width="100px" ID="txtGridDSCaNhom" runat="server" Text='<%# Bind("DSCaNhom") %>'></asp:TextBox>
                         <cc1:FilteredTextBoxExtender TargetControlID="txtGridDSCaNhom" FilterType="Numbers" 
                            ID="FilteredTextBoxExtender9" runat="server" Enabled="True">
                        </cc1:FilteredTextBoxExtender>
                         <asp:RequiredFieldValidator ControlToValidate="txtGridDSCaNhom" Display="None" ID="RequiredFieldValidator13" runat="server" ErrorMessage="Phải nhập doanh số cả nhóm">
                         </asp:RequiredFieldValidator>
                <cc1:ValidatorCalloutExtender TargetControlID="RequiredFieldValidator13" 
                    ID="ValidatorCalloutExtender13" runat="server" Enabled="True">
                </cc1:ValidatorCalloutExtender>
                
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:Label ID="lblGridDSCaNhom" runat="server" Text='<%# Bind("DSCaNhom") %>'></asp:Label>
                    </ItemTemplate>
                    <ItemStyle HorizontalAlign="Center" />
                    <HeaderStyle HorizontalAlign="Center" />
                </asp:TemplateField>
                
                
                <asp:TemplateField HeaderText="Nhánh chuẩn">
                    <EditItemTemplate>
                        <asp:TextBox width="100px" ID="txtGridNhanhChuan" runat="server" Text='<%# Bind("NhanhChuan") %>'></asp:TextBox>
                         <cc1:FilteredTextBoxExtender TargetControlID="txtGridNhanhChuan" FilterType="Numbers" 
                            ID="FilteredTextBoxExtender10" runat="server" Enabled="True">
                        </cc1:FilteredTextBoxExtender>
                         <asp:RequiredFieldValidator ControlToValidate="txtGridNhanhChuan" Display="None" ID="RequiredFieldValidator14" runat="server" ErrorMessage="Phải nhập số nhánh chuẩn">
                         </asp:RequiredFieldValidator>
                <cc1:ValidatorCalloutExtender TargetControlID="RequiredFieldValidator14" 
                    ID="ValidatorCalloutExtender14" runat="server" Enabled="True">
                </cc1:ValidatorCalloutExtender>
                
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:Label ID="lblGridNhanhChuan" runat="server" Text='<%# Bind("NhanhChuan") %>'></asp:Label>
                    </ItemTemplate>
                    <ItemStyle HorizontalAlign="Center" />
                    <HeaderStyle HorizontalAlign="Center" />
                </asp:TemplateField>
                
            
            
            <asp:CommandField HeaderStyle-Width="50px" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" CausesValidation="False" HeaderText="Sửa" ShowEditButton="True" ControlStyle-Height="25px" ControlStyle-Width="25px"  ItemStyle-Height="25px" ItemStyle-Width="50px" ButtonType="Image" EditImageUrl="~/image/Burn Folder.png" EditText="Sửa" CancelImageUrl="~/image/Redo.png" CancelText="Thoát" UpdateText="Cập nhập" UpdateImageUrl="~/image/Documents Folder.png" />
            <asp:CommandField  HeaderStyle-Width="50px" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" ControlStyle-Height="25px" ControlStyle-Width="25px" ItemStyle-Height="25px" ItemStyle-Width="50px"  ButtonType="Image" DeleteText="Xóa" DeleteImageUrl="~/image/Symbol-Delete.png" CausesValidation="False" HeaderText="Xóa" ShowDeleteButton="True" />
               
          </Columns>
      </asp:GridView>
</fieldset>
</ContentTemplate>
</asp:UpdatePanel>